package xj.graph2d.template;

import java.util.Map;

import xj.graph2d.CompoundDrawShape;
import xj.graph2d.EllipseShape;
import xj.graph2d.RectangleShape;
import xj.graph2d.shapes.RotatableCompoundDrawShape;

public class CompoundTemplate extends Template {

  public CompoundTemplate() {
  }

  @Override
  public void makeTemplate(Map iconMap) {
    CompoundDrawShape comp = new RotatableCompoundDrawShape();
    comp.setName("Compound-1");
    // comp.setAtomic(true);
    // comp.setAllowRotation(true);
    comp.addShape(new RectangleShape(0, 0, 50, 100));
    comp.addShape(new EllipseShape(50, 10, 100, 90));
    comp.fitComponents();
    add(new TemplateToolButton("Compound-1", comp, 24, 24, false, true));

    comp = new CompoundDrawShape();
    comp.setName("Compound-2");
    comp.setAtomic(true);
    comp.addShape(new EllipseShape(0, 0, 40, 40));
    comp.addShape(new EllipseShape(10, 10, 30, 30, true));
    comp.fitComponents();
    add(new TemplateToolButton("Compound-2", comp, 24, 24, false, true));

  }

}
